import React from 'react'
import { tabbars } from '../../router/router'
import { Outlet } from 'react-router-dom'
import { useNavigate } from 'react-router-dom'
import { Tabbar } from 'react-vant'
function Index() {
     const navigate=useNavigate()
  return (
    <div>
          <Outlet />
          <Tabbar onChange={(key) => navigate(key)}>
              {
                  tabbars.map((item,index)=>{
                      return <Tabbar.Item icon={item.icon} name={item.path}>{ item.title}</Tabbar.Item>
                  })
              }
      
        
      </Tabbar>
    </div>
  )
}

export default Index
